let msgTarget = null;
function toast(message, type, notOnly) {
  // console.error("toast", this);
  let $message = toast.ctx || window.$message;
  if (!$message) {
    return console.error("[toast依赖于element-plus的$message]", message, type, notOnly);
  }
  !notOnly && msgTarget && msgTarget.close();
  msgTarget = $message({ showClose: true, message: message, type: type || "info" });
  return msgTarget;
}
toast.ctx = null;
export default toast;
